package com.tianma315.admin.product.domain;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.tianma315.admin.common.base.BaseDomain;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

//                   _ooOoo_
//                  o8888888o
//                  88" . "88
//                  (| -_- |)
//                  O\  =  /O
//               ____/---'\____
//             .'  \\|     |//  .
//            /  \\|||  :  |||//  \
//           /  _||||| -:- |||||-  \
//           |   | \\\  -  /// |   |
//           | \_|  ''\---/''  |   |
//           \  .-\__  -  ___/-. /
//         ___. .'  /--.--\  . . __
//      ."" '<  .___\_<|>_/___.'  >'"".
//     | | :  - \.;\ _ /;./ -  : | |
//     \  \ -.   \_ __\ /__ _/   .- /  /
//======-.____-.___\_____/___.-____.-'======
//                   =---='
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//         佛祖保佑       永无BUG

/**
 * 产品模型
 * <p>
 * Created by zcm on 2019/5/25.
 */

@TableName("product")
public class Product extends BaseDomain {
    @TableField(exist = false)
    public static final int STATUS_ENABLE = 1;
    @TableField(exist = false)
    public static final int STATUS_DELETE = 2;

    @TableId
    private long productId;// bigint(20) NOT NULL AUTO_INCREMENT,
    private long merchantId;// bigint(20) DEFAULT NULL COMMENT '商户id',
    @NotBlank(message = "产品名称不能为空")
    private String productName;// varchar(100) DEFAULT NULL COMMENT '产品名称',
    private String productIdent;// varchar(255) DEFAULT '' COMMENT '产品标识符',
    @NotBlank(message = "产品规格名称不能为空")
    private String productSpec;// varchar(50) DEFAULT NULL COMMENT '产品规格名称',
    @NotBlank(message = "单位不能为空")
    private String unit; //单位
    private String description;// varchar(255) DEFAULT NULL COMMENT '产品描述',
    private int boxSize;// int(11) DEFAULT NULL COMMENT '包装数量',
    @Max(value = Integer.MAX_VALUE, message = "价格超出最大值")
    @Min(value = 0, message = "价格不能小于0")
    private Integer productPrice;// int(11) DEFAULT NULL COMMENT '价格/分',
    @NotBlank(message = "保质期不能为空")
    private String warranty;// varchar(255) DEFAULT NULL COMMENT '质保期',
    @Min(value = 0, message = "积分不能小于0")
    @Max(value = Integer.MAX_VALUE, message = "积分超出最大值")
    private Integer integral;// int(11) DEFAULT NULL COMMENT '积分',
    private Integer status;// int(11) DEFAULT '0' COMMENT '状态 1有效 2删除',
    private Integer checkTemplateId;


    public long getProductId() {
        return productId;
    }

    public void setProductId(long productId) {
        this.productId = productId;
    }

    public long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(long merchantId) {
        this.merchantId = merchantId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductIdent() {
        return productIdent;
    }

    public void setProductIdent(String productIdent) {
        this.productIdent = productIdent;
    }

    public String getProductSpec() {
        return productSpec;
    }

    public void setProductSpec(String productSpec) {
        this.productSpec = productSpec;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getBoxSize() {
        return boxSize;
    }

    public void setBoxSize(int boxSize) {
        this.boxSize = boxSize;
    }

    public Integer getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(Integer productPrice) {
        this.productPrice = productPrice;
    }

    public String getWarranty() {
        return warranty;
    }

    public void setWarranty(String warranty) {
        this.warranty = warranty;
    }

    public Integer getIntegral() {
        return integral;
    }

    public void setIntegral(Integer integral) {
        this.integral = integral;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getCheckTemplateId() {
        return checkTemplateId;
    }

    public void setCheckTemplateId(Integer checkTemplateId) {
        this.checkTemplateId = checkTemplateId;
    }
}
